package com.qf.service.impl;

import com.qf.mapper.RackMapper;
import com.qf.pojo.Bookrack;
import com.qf.pojo.req.UserRack;
import com.qf.service.RackService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class RackServiceImpl implements RackService {
    @Resource
    RackMapper rackMapper;
    @Override
    public List<UserRack> findByUid(int uid) {
        return rackMapper.findByUid(uid);
    }

    @Override
    public UserRack findByUidAndBid(int uid, int bid) {
        return rackMapper.findByUidAndBid(uid,bid);
    }

    @Override
    public int add(Bookrack bookrack) {
        return rackMapper.add(bookrack);
    }

    @Override
    public int delete(int uid, int bid) {
        return rackMapper.delete(uid, bid);
    }
}
